import React from 'react';
import {observer, inject} from 'mobx-react';
import {toJS} from 'mobx';

import {Layout} from 'amis';

import {IMainStore} from '../store';
import {RouteComponentProps, matchPath, Switch, Route} from 'react-router';

import Header from '../component/home/Header'
import AsideNav from '../component/home/AsideNav'

export default inject('store')(
    observer(function ({
                           store,
                           location,
                           history
                       }: { store: IMainStore } & RouteComponentProps) {

        console.log("menus,", toJS(store.homeStore.menuStore.menus))

        return (
            <div style={{backgroundColor:'#353535'}}>
                <Layout
                    header={<Header store={store}></Header>}
                    aside={<AsideNav store={store}></AsideNav>}
                    folded={store.asideFolded}
                    offScreen={store.offScreen}
                >
                </Layout>
            </div>
        );
    })
);
